<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="id" value="{$row.id}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>订单号:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.order_no}</span>
        </div>
    </div>
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">客户昵称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[delivery_sn]" value="{$row.nickname}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="goods_title" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>商品标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="goods_title" name="row[goods_title]" value="{$row.goods_title}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>商品类型:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.goods_type ? '虚拟' : '实物'}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">兑换数量:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.number}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">消费积分:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.points}</span>
        </div>
    </div>
    <div class="form-group">
        <label for="realname" class="control-label col-xs-12 col-sm-2">联系姓名:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="realname" name="row[realname]" value="{$row.nickname}"/>
        </div>
    </div>

    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">手机号码:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$row.mobile}" />
        </div>
    </div>

    <div class="form-group">
        <label for="address" class="control-label col-xs-12 col-sm-2">收货地址:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="address" name="row[address]" value="{$row.address}"/>
        </div>
    </div>



    <div class="form-group">
        <label for="delivery_name" class="control-label col-xs-12 col-sm-2">物流名称:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input type="text" class="form-control" id="delivery_name" name="row[delivery_name]" value="{$row.delivery_name}" data-rule="required" />-->
            <?php
            $deliverys = config('goods.deliverys');
            ?>
            {:build_select('row[delivery_code]', $deliverys, $row['delivery_code'], [
            'class' => 'form-control',
            ])}
        </div>
    </div>

    <div class="form-group">
        <label for="delivery_sn" class="control-label col-xs-12 col-sm-2">物流单号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="delivery_sn" name="row[delivery_sn]" value="{$row.delivery_sn}" data-rule="required" />
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">阶段:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.stage_name}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            <span class="form-control" disabled="true">{$row.status_name}</span>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">创建时间:</label>
        <div class="col-xs-12 col-sm-4">
            <span class="form-control" disabled="true">{:date('Y-m-d H:i:s', $row[create_time])}</span>
        </div>
    </div>

    <div class="form-group">
        <label for="confrim_time" class="control-label col-xs-12 col-sm-2">确认时间:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" class="form-control datetimepicker" id="confrim_time" name="row[confim_time]" value="{$row['confrim_time'] ? date('Y-m-d H:i:s',$row['confrim_time']) : ''}"/>
        </div>
    </div>

    <div class="form-group">
        <label for="delivery_time" class="control-label col-xs-12 col-sm-2">发货时间:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" class="form-control datetimepicker" id="delivery_time" name="row[delivery_time]" value="{$row['delivery_time'] ? date('Y-m-d H:i:s',$row['delivery_time']) : ''}"/>
        </div>
    </div>

    <div class="form-group">
        <label for="finish_time" class="control-label col-xs-12 col-sm-2">完成时间:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" class="form-control datetimepicker" id="finish_time" name="row[finish_time]" value="{$row['finish_time'] ? date('Y-m-d H:i:s',$row['finish_time']) : ''}"/>
        </div>
    </div>


    {if $row['cancel_time']}
        <div class="form-group">
            <label for="cancel_time" class="control-label col-xs-12 col-sm-2">取消时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input type="text" class="form-control datetimepicker" id="cancel_time" name="row[cancel_time]" value="{$row['cancel_time'] ? date('Y-m-d H:i:s',$row['cancel_time']) : ''}"/>
            </div>
        </div>
    {/if}

    <div class="form-group hidden layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>